#include "STL_Buffer.h"

#include <fstream>
#include <iostream>


using namespace std;

STL_Buffer::STL_Buffer(const char * const srcFile, const char * const outFile) : 
    inFile(srcFile, ifstream::in),
    outFile(outFile, ifstream::out) { }

STL_Buffer::~STL_Buffer(void) { }


int STL_Buffer::getchar()
{
    int c = inFile.get();
    return c;
}

void STL_Buffer::ungetchar(size_t times)
{
    while(times > 0){
        inFile.unget();
        times--;
    }
}

void STL_Buffer::putchar(char value)
{
    printf("###WARNING### using unimplemented method STL_Buffer::putchar(char)\n");
}
